SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE PROCEDURE [dbo].[_PrescriptionVoid_GetByDate]
            @fromdate DATETIME ,
            @todate DATETIME
        AS 
            BEGIN

                SELECT  PV.PrescriptionID ,
                        TotalAmount ,
                        VoidReason ,
                        VoidPerson ,
                        VoidDate ,
                        PV.Remark
                FROM    dbo.PrescriptionVoid PV
                        INNER JOIN dbo.Prescription P ON PV.PrescriptionID = P.PrescriptionID
                WHERE   VoidDate BETWEEN @fromdate AND @todate
            END
GO
